#include <iostream>
#include <string>
using namespace std;
int main(){
    string str1,str2;
    cin>>str1>>str2;
    for (int i=0;i<str1.length();i++){
        int count=1;
        for (int j=0;j<str2.length();j++){
            if (str1[i]==str2[j]){
                str2=str2.substr(0,j)+str2.substr(j+1,str2.length()-1);
                count=0;
                break;
            }
        }
        if(count==1){
            cout<<"No"<<endl;
            return 0;
        }
    }
    if (str2.length()!=0){cout<<"No"<<endl;return 0;
    }else{cout<<"Yes"<<endl;return 0;
    }
}